package com.aigou.admin.aigouspringboot.controller.user;

import com.aigou.admin.aigouspringboot.common.LogScope;
import com.aigou.admin.aigouspringboot.entity.CarouselFigure;
import com.aigou.admin.aigouspringboot.result.Result;
import com.aigou.admin.aigouspringboot.service.CarouselFigureService;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController("CarouselFigureController")
@RequestMapping("/user/carouselFigure")
@Slf4j
public class CarouselFigureController {
    @Resource
    private CarouselFigureService carouselFigureService;

    @GetMapping
    @LogScope(title= "轮播图管理模块", content = "轮播图信息")
    public Result select(@RequestParam Integer current){
        PageInfo<CarouselFigure> pageInfo=carouselFigureService.selectCarouselFiguresByPage(current);
        return Result.success(pageInfo);
    }

}
